from selenium import webdriver
from selenium.webdriver.common.by import By
import time,pytest
from jdbc import a3mall
dr=webdriver.Edge()
dr.get('http://10.59.9.14:7003/home/login.html')
dr.find_element(By.NAME,'username').send_keys('15649920329')
time.sleep(2)
dr.find_element(By.NAME,'password').send_keys('1234567')
time.sleep(10)
dr.find_element(By.XPATH,'//*[@id="theForm"]/div[5]/a').click()
time.sleep(2)
a=dr.get_cookies()
time.sleep(2)
dr.quit()
dr=webdriver.Edge()
dr.get('http://10.59.9.14:7003/home/index.html')
time.sleep(2)
for i in a:
    dr.add_cookie(i)
dr.refresh()
time.sleep(2)
